﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Diagnostics;
using SimDev.ViewModel;
using SimDev.Config;
using System.IO;
using System.Globalization;
using WServer.Service;

namespace SimDev
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window 
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        MainViewModel _mainViewModel = null;
        
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            _mainViewModel = new MainViewModel(DevConfig.Load());
            this.DataContext = _mainViewModel;
        }
        
      
        //发送数据
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            _mainViewModel.SendOnceData();
        }
 

  

        //自动发送
        private void AutoSend(object sender, RoutedEventArgs e)
        {
          
            _mainViewModel.AutoSendData();
        }

        //停止发送
        private void StopSend(object sender, RoutedEventArgs e)
        {

            _mainViewModel.StopSendData();
        }


        //dtu DataGrid的checkbox











    }
}
